package com.demo.utils.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.utils.modle.Emp;
import com.demo.utils.service.EmpService;
import com.demo.utils.mapper.EmpMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 */
@Service
public class EmpServiceImpl extends ServiceImpl<EmpMapper, Emp> implements EmpService{

    @Autowired
    private EmpMapper empMapper;

    @Override
    @Transactional
    public int addEmp(Emp emp) {

        int selective = empMapper.insertSelective(emp);
//        int i = 11;
//        int i1 = 0;
//        i = i/ i1;
        return  selective;
    }
}




